package com.ibeeking.found.file.rest.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ibeeking.found.file.service.common.dos.UserFileDO;
import com.ibeeking.found.file.service.common.vo.FileListVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface IUserFileService extends IService<UserFileDO> {

    List<UserFileDO> selectUserFileByNameAndPath(String fileName, String filePath, Long userId);

    List<UserFileDO> selectSameUserFile(String fileName, String filePath, String extendName, Long userId);

    Page<FileListVO> userFileList(Long userId, String filePath, Integer beginCount, Integer pageCount);

    void updateFilepathByUserFileId(Long userFileId, String newfilePath, Long userId);

    void userFileCopy(Long userId, Long userFileId, String newfilePath);

    Page<FileListVO> getFileByFileType(Integer fileTypeId, Integer currentPage, Integer pageCount, Long userId);

    List<UserFileDO> selectUserFileListByPath(String filePath, Long userId);

    List<UserFileDO> selectFilePathTreeByUserId(Long userId);

    void deleteUserFile(Long userFileId, Long sessionUserId);

    List<UserFileDO> selectUserFileByLikeRightFilePath(@Param("filePath") String filePath, @Param("userId") Long userId);

}
